package shopping;

public class Main {
    public static void main(String[] args) {
        Product sprite=new Product("雪碧","饮料",3.0,3);
        Product cola=new Product("可乐","饮料",3.0,5);
        Product juice=new Product("果汁","饮料",4.0,4);
        Product apple=new Product("苹果","水果",5.0,2);
        Product banana=new Product("香蕉","水果",4.5,5);
        ShoppingCart  cart=new ShoppingCart(20);
        cart.addProduct(sprite);
        cart.addProduct(cola);
        cart.addProduct(apple);
        cart.display();
        double totalMoney= cart.getTotalPrice();
        System.out.println("总价为：" + totalMoney);
        System.out.println();
        cart.removeProduct(apple);
        cart.display();
        double totalPrice=cart.getTotalPrice();
        System.out.println("总价为："+totalPrice);
    }
}
